package com.fallenpanda.demo;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

/**
 * Created by Android on 2014/12/1.
 */
public class MainActivity extends Activity {

    static {
        System.loadLibrary("Hello");
    }

    public native String helloWorldFromC();

    private TextView textView;
    private String str;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        str = helloWorldFromC();
        textView = (TextView) findViewById(R.id.hello);
        textView.setText(str);
    }
}
